﻿namespace FiftyOne.Foundation.Mobile.Detection.Wurfl.Handlers
{
    using System;

    internal class SPVHandler : RegexSegmentHandler
    {
        private const string REGEX = @"(.*)(SPV\s+.+);(.*)\s+OpVer\s+(\d+)\.(\d+)\.(\d+)\.(\d+)(.*)";

        internal SPVHandler() : base(@"(.*)(SPV\s+.+);(.*)\s+OpVer\s+(\d+)\.(\d+)\.(\d+)\.(\d+)(.*)", new int[] { 0x10, 0x10, 0x10, 8, 4, 2, 1, 0x10 })
        {
        }

        protected internal override bool CanHandle(string userAgent)
        {
            return (userAgent.Contains("SPV") && base.CanHandle(userAgent));
        }
    }
}

